package com.tramy.cnpush.utils;

import com.facebook.react.bridge.Callback;

public class CallBackUtils {

    private static Callback myCallback;

    private CallBackUtils() {

    }

    public static void trustCallback(Callback callback) {
        myCallback = callback;
    }

    public static void consumeCallback(String payload) {
        if (myCallback != null) {
            myCallback.invoke(payload);
            myCallback = null;
        }
    }

}
